package com.android.gpuimage;

import com.common.base.ComponentContext;
import com.android.gpuimage.util.FilterTools;
import com.photoeditor.R;

/**
 * Created by winn on 17/8/18.
 */

public class WhitenFilter extends GPUImageFilterGroup {

    private GPUImageBilateralFilter mMopiFilter;
    private GPUImageLookupFilter mLookupFilter;

    public WhitenFilter() {
        this(2);
    }

    public WhitenFilter(int mopiLevel) {
        mMopiFilter = new GPUImageBilateralFilter(mopiLevel);
        mLookupFilter = new GPUImageLookupFilter();
        mLookupFilter.setBitmap(FilterTools.getDecryptBitmap(ComponentContext.getContext(), R.raw.beauty));
        addFilter(mMopiFilter);
        addFilter(mLookupFilter);
        mLookupFilter.setIntensity(0.6f);
        mMopiFilter.setDistanceNormalizationFactor(15);
    }

    @Override
    public boolean isSupportIntensity() {
        return false;
    }

    @Override
    public void setIntensity(float intensity) {
//        mMopiFilter.setDistanceNormalizationFactor(intensity * 100);
    }
}
